package test2;

import java.util.HashMap;
import java.util.Map;

public class Factory {
    private Map<String, Info>files=new HashMap<String, Info>();
    public Info factory(String book){
        Info base=files.get(book);
        if (base==null){
            base=new Concrete(book);
            files.put(book,base);
        }
        return base;
    }
}
